<template>
    <div class="home-box">
        <!-- 首页分类列表 start -->
        <div v-for="(item, index) in types" :key="index">
            <div class="list-name">
                <span>{{ item.typeName }}</span>
                <span class="list-more" @click=" $root.$emit('update:name','FilmsPage') ">更多 > </span>
                <!-- <a href="./films.html">更多 ></a> -->
            </div>
            <!-- <div class="list-content">
                        <film-item v-for="(item, index) in 6" :key="index"></film-item>
                    </div> -->
            <film-list class="list-content" :list="item.list"></film-list>
        </div>
        <!-- 首页分类列表 end -->
    </div>
</template>
<script>
    Vue.component("HomePage", {
        template: document.currentScript.ownerDocument.querySelector("template"),
        data(){
            return {
                types:homeData.result
            }
        }
    })

</script>